<script lang="ts" setup>
import router from '@/router'

const prop = defineProps({
  title: {
    default: true,
  },
});

const getTop = () => {
  router.back();
};
</script>

<template>
  <div class="topNav">
    <van-icon name="arrow-left" @click="getTop" />
    <span style="font-weight: bold">{{ prop.title }}</span>
    <span style="width: 20px"></span>
  </div>
</template>

<style scoped>
.topNav {
  display: flex;
  width: 100%;
  height: 50px;
  justify-content: space-between;
  align-items: center;
  padding: 0 10px 0 10px;
}
</style>
